<?php
include dirname(dirname(__FILE__))."/s_user-manage/s_user-verify.php";
include dirname(__FILE__)."/function.php";
if(isset($_POST['submited'])&&$_POST['submited']==1) {
	$result=dowith_sql(addslashes($_POST["result"]));
	$storeName=dowith_sql(addslashes($_POST["storeName"]));
	$arr=explode(",", $result);
	if (addApply($arr[0], $arr[1], $_SESSION['s_user_id'])){
		
		 $applyId=mysql_insert_id();
		 if (addAcessory($storeName, $applyId,$_SESSION['s_username'])) {
		 	alertInfo("申请成功,请等待审核", getHost()."/front-show/place-apply/index.php");
		 	
		 }else {
		 	alertInfo("申请失败", getHost()."/front-show/place-apply/index.php");
		 	
		 }
		
	}else {
		alertInfo("申请失败", getHost()."/front-show/place-apply/index.php");
	}
}
?>